#pragma once
#include "dsegen.h"
#include "PathInfo.h"
#include "BlockDesign.h"
#include "BlockChessboard.h"

namespace dhis
{
	//------------------------------------------------------------------------------
	bool _exportObjectsToXMLFile(CMacroBlock* block,const CRectI& rect,const std::string& szFileName);
	bool _exportObjectsToXMLFile(CBlockChessboard& chessboard,BlockMap& blocks,const std::string& szFolder);

	//------------------------------------------------------------------------------
	bool _findBoundaryEdge(const CRegionObject* obj,const int& xsize, const int& ysize,std::vector<CEdge>& edges, CEdge* xmin0e);

	//------------------------------------------------------------------------------
	OGRPolygon* _trackPolygon(const CRegionObject* obj,const CImageInfo* img);

	//------------------------------------------------------------------------------
	OGRLayer* _createShapeLayer(OGRDataSource *poDS,const CImageInfo* pImg,const std::string& szShpFile);
	bool _exportShapeFile(CMacroBlock* block,const CImageInfo* pImg,OGRLayer* poLayer);
	bool _exportShapeFile(CBlockChessboard& chessboard,BlockMap& blocks,const CImageInfo* pImg,const std::string& szFolder);

	bool _exportFrontierShapeFile(CMacroBlock* block,const CImageInfo* pImg,OGRLayer* poLayer);
	bool _exportFrontierShapeFile(CBlockChessboard& chessboard,BlockMap& blocks,const CImageInfo* pImg,const std::string& szFolder);
}
